package com.guigu.youxuan.mapper;

import com.guigu.youxuan.pojo.CartInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guigu.youxuan.pojo.dto.CartInfoDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liweixin
 * @since 2024-05-15
 */
public interface CartInfoMapper extends BaseMapper<CartInfo> {

    List<CartInfoDto> GoodsInfoListPage(int sysUsersId);

    /**
     * 购物车数量
     * @param sysUsersId
     * @return
     */
    String selCarts(int sysUsersId);

    void delCartInfo(int cartId);

    CartInfo selectCartItem(@Param("sysUsersId") int sysUsersId, @Param("goodsId") int goodsId);

    void updateCartCount(@Param("goodsId") int goodsId, @Param("goodsCount") int goodsCount);
}
